<!DOCTYPE HTML>
<html>
	<head>
		<title>改变样式</title>
	</head>
	<body>
		<p id="demo">js能改变html元素的样式</p>
		<button type="button" onclick="myFunction()">点击这里</button>

		<script type="text/javascript">
            function myFunction(){
            	var e = document.getElementById("demo"); //找到元素
            	e.style.color = 'blue';                  //改变样式
            }

            //for/in遍历对象或者数组
            // var arr = {'name':'pan','age':18}
            // for(var i in arr){
            // 	document.write(arr[i]);
            // }
            

            //返回当前页面的url
            //document.write(location.href);
		</script>

	</body>
</html>